Current database update techniques can be resource intensive. For example, updating a counter in the database causes the data storage system to read the value from storage into a memory location, add one to the value, write the new value back into the memory location, and then finally write the new value to storage. Thus, an update operation involves at least two input-output operations. If the counter is incremented multiple times, e.g., 1000 times, then 2000 input-output operations are performed to storage (whether memory or disk). Since the read operations can consume more time compared to the write operation, the update operation can consume significant computing resources and thereby reduce the performance of the data storage system.
Furthermore, when there is more than one process or thread incrementing the counter, a particular process or thread obtains a synchronization lock on the counter until the update is complete. However, using synchronization locks can consume significant computing resources and cause additional delays. Moreover, the source code for developing applications with synchronization locks can also become complicated and introduce errors that are difficult to troubleshoot.